Field of the Invention
The present invention relates to the field of message queues and more particularly to message retrieval from message queues.
Description of the Related Art
In the field of information technology, a message queue is a software-engineering component used for inter-process communications or inter-thread communications. The component employs a queue into which messages can be placed by a messenger and from which messages can be retrieved by a designated recipient. In this regard, the message queue can be a communicative component enabling asynchronous messaging as between the messenger and the designated recipient. Operationally, the message queue can support multiple messengers and recipients such that asynchronous communications can be achieved for a group of participants.
The asynchronous nature of the message queue provides for an ideal technology coupler for disparate technologies. Specifically, so long as separate technologies can access the message queue, the separate and disparate technologies can engage in message passing thereby enabling communications. In particular, the message queue can expose different method calls through an application programming interface (API) for opening, writing to, reading from, and closing the message queue. Each application in turn can include logic to invoke a sequence of the method calls in order to either place a message into the message queue, or to retrieve a message from the message queue.
Accessing a message queue often requires the invocation of a sequence of message queue method calls. A typical sequence includes:                OPEN (q_handle, queuing_resource)        WRITE (q_handle, message_buffer)        CLOSE (q_handle)For message writing operations, it can be inefficient to invoke three separate method calls in the message queue API. Accordingly, it is known to combine the three method calls into a single method call exposed by the message queue API. For instance, the single method call can include WRITE (queuing_resource, message_buffer).        
For message writing to the message queue, it makes sense to consolidate the three method calls into a single method call for the message queue. Specifically, generally writing to the message queue requires a single write operation wrapped by the opening and closing of the message queue. The same is not true in consideration of retrieving messages from a message queue. Rather, in most cases the message queue is to be opened and a sequence of message retrieval operations are invoked before closing the message queue. To consolidate the sequence into a single operation would require the repeated invocation of the operation to accommodate multiple different message retrieval requests. As such, at present message queues do not provide a single method call to retrieve a message from the message queue. Accordingly, for granular message retrieval requests for a single instance of message data, three method calls to the message queue API are required.